import request from '@/utils/request';

// 获取银行卡列表
export function getBankCardList() {
  return request({
    url: '/api/bankcard/list',
    method: 'get'
  });
}

// 添加银行卡
export function addBankCard(data) {
  return request({
    url: '/api/bankcard/add',
    method: 'post',
    data
  });
}

// 获取银行卡详情
export function getBankCardDetail(id) {
  return request({
    url: `/api/bankcard/${id}`,
    method: 'get'
  });
}

// 设置默认银行卡
export function setDefaultBankCard(id) {
  return request({
    url: `/api/bankcard/default/${id}`,
    method: 'put'
  });
}

// 删除银行卡
export function deleteBankCard(id) {
  return request({
    url: `/api/bankcard/${id}`,
    method: 'delete'
  });
}
